Optimal. Leaf size=50 \[ \frac {1}{2} x \left (2 a^2+b^2\right )+\frac {2 a b \sin (c+d x)}{d}+\frac {b^2 \sin (c+d x) \cos (c+d x)}{2 d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.01, antiderivative size = 50, normalized size of antiderivative = 1.00, number of steps used = 1, number of rules used = 1, integrand size = 12, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.083, Rules used = {2644} \[ \frac {1}{2} x \left (2 a^2+b^2\right )+\frac {2 a b \sin (c+d x)}{d}+\frac {b^2 \sin (c+d x) \cos (c+d x)}{2 d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2644
Rubi steps
\begin {align*} \int (a+b \cos (c+d x))^2 \, dx &=\frac {1}{2} \left (2 a^2+b^2\right ) x+\frac {2 a b \sin (c+d x)}{d}+\frac {b^2 \cos (c+d x) \sin (c+d x)}{2 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.08, size = 46, normalized size = 0.92 \[ \frac {2 \left (2 a^2+b^2\right ) (c+d x)+8 a b \sin (c+d x)+b^2 \sin (2 (c+d x))}{4 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.91, size = 40, normalized size = 0.80 \[ \frac {{\left (2 \, a^{2} + b^{2}\right )} d x + {\left (b^{2} \cos \left (d x + c\right ) + 4 \, a b\right )} \sin \left (d x + c\right )}{2 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.48, size = 43, normalized size = 0.86 \[ \frac {1}{2} \, {\left (2 \, a^{2} + b^{2}\right )} x + \frac {b^{2} \sin \left (2 \, d x + 2 \, c\right )}{4 \, d} + \frac {2 \, a b \sin \left (d x + c\right )}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.04, size = 51, normalized size = 1.02 \[ \frac {b^{2} \left (\frac {\cos \left (d x +c \right ) \sin \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )+2 a b \sin \left (d x +c \right )+a^{2} \left (d x +c \right )}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.77, size = 44, normalized size = 0.88 \[ a^{2} x + \frac {{\left (2 \, d x + 2 \, c + \sin \left (2 \, d x + 2 \, c\right )\right )} b^{2}}{4 \, d} + \frac {2 \, a b \sin \left (d x + c\right )}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.53, size = 42, normalized size = 0.84 \[ a^2\,x+\frac {b^2\,x}{2}+\frac {b^2\,\sin \left (2\,c+2\,d\,x\right )}{4\,d}+\frac {2\,a\,b\,\sin \left (c+d\,x\right )}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.25, size = 78, normalized size = 1.56 \[ \begin {cases} a^{2} x + \frac {2 a b \sin {\left (c + d x \right )}}{d} + \frac {b^{2} x \sin ^{2}{\left (c + d x \right )}}{2} + \frac {b^{2} x \cos ^{2}{\left (c + d x \right )}}{2} + \frac {b^{2} \sin {\left (c + d x \right )} \cos {\left (c + d x \right )}}{2 d} & \text {for}\: d \neq 0 \\x \left (a + b \cos {\relax (c )}\right )^{2} & \text {otherwise} \end {cases} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________